package com.aatattoo.light_food_service.mapper;

import com.aatattoo.light_food_service.entity.Verification;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author aatattoo
 * @Date 2021/12/14 8:03 下午
 * @msg:
 */
@Mapper
@Repository
public interface VerificationMapper {
    /**
     * 添加申请验证码的手机号
     * @param verification
     * @return
     */
    int addVerification(Verification verification);

    /**
     * 检查申请验证嘛的号码是否申请过
     * @param pheoneNumber
     * @return
     */
    int isTableExist(@Param("pheoneNumber") String pheoneNumber);

    /**
     * 更新已有手机号申请的验证码信息
     * @param verification
     * @return
     */
    int updataVerification(Verification verification);

    /**
     * 通过手机号获取验证码信息
     * @param pheoneNumber
     * @return
     */
    Verification findeByPhoneNumber(@Param("pheoneNumber") String pheoneNumber);
}
